package com.dc.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 维保表
 *
 * @author feishaobin
 * @email
 * @date 2021-12-21 11:38:02
 */
@Data
@ApiModel
@TableName("dc_maintenance_work_order")
public class MaintenanceWorkOrder implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @TableId
    @ApiModelProperty(value = "")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    /**
     * 维保人员id
     */
    @ApiModelProperty(value = "维保人员id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long maintenanceUserId;
    /**
     * 维保人员姓名
     */
    @ApiModelProperty(value = "维保人员姓名")
    private String maintenanceUserName;

    /**
     * 区域id
     */
    @ApiModelProperty(value = "区域id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long regionId;

    /**
     * 区域位置
     */
    @ApiModelProperty(value = "区域位置")
    private String regionName;
    /**
     * 联系方式
     */
    @ApiModelProperty(value = "联系方式")
    private String mobile;
    /**
     * 本次维保时间
     */
    @Excel(name = "本次维保时间", exportFormat = "yyyy-MM-dd HH:mm:ss", needMerge = true)
    @ApiModelProperty(value = "本次维保时间")
    private Date currentTime;
    /**
     * 值班人员id
     */
    @ApiModelProperty(value = "值班人员id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long dutyUserId;
    /**
     * 值班人员姓名
     */
    @Excel(name = "值班人员姓名", needMerge = true)
    @ApiModelProperty(value = "值班人员姓名")
    private String dutyUserName;

    @ApiModelProperty(value = "工单编号")
    @Excel(name = "工单编号", needMerge = true)
    private String number;


    @ApiModelProperty(value = "工单状态 0：待处理 1：处理中 2：已完成")
    @Excel(name = "状态", replace = {"待处理_0", "处理中_1", "已完成_2"}, needMerge = true)
    private Integer status;
    /**
     * 维保结果 0：已完成 1：未完成
     */
    @ApiModelProperty(value = "维保结果 0：已完成 1：未完成")
    private Integer maintenanceStatus;
    /**
     * 设备状态 0:正常 1:故障
     */
    @ApiModelProperty(value = "设备状态 0:正常 1:故障")
    private Integer deviceStatus;
    /**
     * 下次维保时间
     */
    @ApiModelProperty(value = "下次维保时间")
    private Date nextTime;
    /**
     * 维保信息记录
     */
    @Excel(name = "维保信息记录", needMerge = true)
    @ApiModelProperty(value = "维保信息记录")
    private String maintenanceRecord;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @TableField(exist = false)
    @ExcelCollection(name = "维保项目详情")
    private List<MaintenanceRelation> info;



}
